perm filename A76.TEX[106,RWF] blob
sn#807777 filedate 1985-11-11 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 \magnification\magstephalf
C00005 ENDMK
Cā;
\magnification\magstephalf
\input macro.tex
\def\today{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year}
\baselineskip 14pt
\rm
\line{\sevenrm a76.tex[106,phy] \today\hfill}
\bigskip
This program will print a table giving the ordinal values in your computer
for all keyboard symbols used in standard Pascal.
If your keyboard has other symbols, or omits some, modify the string constant
{\tt KEYS}.
\medskip
{\parindent0pt
{\obeylines\obeyspaces\let =\ \tt
PROGRAM ORDINALS(OUTPUT);
TYPE STRING??=ARRAY[1..??] OF CHAR;
VAR I,MAX,MIN,T,J: INTEGER;
KEYS: STRING??;
CHRTAB: ARRAY[0..1023] OF CHAR;
BEGIN
KEYS:='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,:;+-*/<>=
$\uparrow\{\}$()[]\spa';
MAX:=-1; MIN:=10000;
FOR I:=1 TO 1023 DO CHRTAB:='{\spa}';
FOR J:=1 TO ?? DO
BEGIN
T:=ORD(KEYS[J]);
CHRTAB[T]:=KEYS[J];
IF T<MIN THEN MIN:=T;
IT T>MAX THEN MAX:=T;
END;
FOR I:=MIN TO MAX DO
BEGIN
IF I=ORD('{\spa}')
THEN WRITELN(I: 4,'{\spa}SPACE')
ELSE WRITELN(I: 4,CHRTAB[I])
END
END.
}
}
\bigskip
\line{\copyright 1984 Robert W. Floyd\hfill}
\line{First draft (not published) December 12, l984.\hfill}
\bye